#ifndef MEDIA_INFO_OBSERVER_H
#define MEDIA_INFO_OBSERVER_H



//如果是.c文件，需要加入此宏的控制，如果是.cpp文件则不需要
#ifdef __cplusplus
extern "C" {
#endif
//register callback

#define METADATA_KEY_TITLE 			    "sys.lynx.media.title"
#define METADATA_KEY_ARTIST 			"sys.lynx.media.artist"
#define METADATA_KEY_ALBUM 			    "sys.lynx.media.album"
#define METADATA_KEY_GENRE 				"sys.lynx.media.genre"
#define METADATA_KEY_DURATION 			"sys.lynx.media.duration"
#define METADATA_KEY_ACTIVE 			"sys.lynx.media.active"
#define METADATA_KEY_STATE 				"sys.lynx.media.state"


struct MediaMetadata{
	char   title[1024];
	char   artist[1024];
	char   album[1024];
	long   duration;
	long   elapsedTime;
	int    playbackStatus; //0 pause,1 playing
};

void start_observe_media_info(void (*pFunc)(struct MediaMetadata * metadata));

void cancel_observe_media_info( );




#ifdef __cplusplus
}
#endif

#endif // MEDIA_INFO_OBSERVER_H
